
#pragma once
#include <string>

namespace fs {

	enum OpenMode {
		FILE_READ = 1,
		FILE_WRITE = 2,
		FILE_APPEND = 4,
		FILE_TRUNCATE = 8,
		FILE_BINARY = 16,
	};

	class File {
	public:
		File();
		File( const std::string &filename, unsigned openmode );
		~File();
		bool open( const std::string &filename, unsigned openmode );
		bool isopen();
		size_t size();
		size_t read( void* buf, size_t buflen );
		size_t write( const void* data, size_t len );
	private:
		struct Impl;

		Impl *_pimpl;
	};



}